<!DOCTYPE html>
<html>

  <head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style type="text/css">
      /*重置样式*/
      
      * {
        margin: 0;
        padding: 0;
      }
      
      img {
        border: none;
        vertical-align: top;
      }
      
      i,
      em,
      b,
      strong {
        font-style: normal;
        font-weight: normal;
      }
      
      ul,
      ol {
        list-style: none;
      }
      
      a {
        color: #666;
        text-decoration: none;
      }
      
      ul {
        list-style: none;
      }
      
      .left-nav {
        height: 500px;
        background: #A5B5CC;
        color: #0078DB;
        border-radius: 5px;
      }
      
      .left-nav li {
        float: left;
        height: 20px;
        line-height: 20px;
        text-align: center;
        margin: 10px;
        font-size: 16px;
        cursor: pointer;
      }
      
      .left-nav li:first-child {
        font-size: 20px;
      }
      
      main {
        height: 500px;
      }
      
      main .right-content {
        width: 100%;
        height: 100%;
      }
      
      main .right-content li {
        width: 100%;
        height: 100%;
      }
      
      main .right-content li:first-child img {
        width: 300px;
        height: 300px;
      }
      main .right-content> li:first-child> a {
        font-size: 30px;
        margin-left: 50px;
      }
    </style>
    <link rel="stylesheet" type="text/css" href="/lib/bootstrap/css/bootstrap.min.css">
  </head>

  <body>
    <!-- container -->
    <div class="container">
      <nav class="navbar navbar-inverse">
        <div class="navbar-header">
          <a class="navbar-brand" href="#">图书管理系统</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav navbar-right not-login">
            <li>
              <a href="#" data-toggle="modal" data-target="#loginModal">登录</a>
            </li>
          </ul>
          <ul class="nav navbar-nav navbar-right hidden login-success">
            <li>
              <a href="#" class="denglu"></a>
            </li>
            <li>
              <a href="#" class="link-logout">注销</a>
            </li>
          </ul>
        </div>
      </nav>
      <ul class="col-md-2 left-nav">
        <li class="manage-list">管理列表</li>
        <li class="user-manage">用户管理</li>
        <li class="book-manage">图书管理</li>
        <li class="reader-manage">读者管理</li>
        <li class="exitsystem">退出系统</li>
      </ul>
      <main class="col-md-10">
        <ul class="right-content">
          <li class="lock"><img src="/images/lock.jpg" />
            <a href="#" data-toggle="modal" data-target="#loginModal">请先登录您的账号!</a>
          </li>
          <li class="lockmiss hidden" style="font-size: 50px;text-align: center;line-height: 490px;">欢迎光临</li>
          <li class="user-interface hidden">
            <nav class="navbar navbar-inverse">
              <div class="navbar-header">
                <a class="navbar-brand" href="#">用户管理</a>
                <a class="navbar-brand" href="#" data-toggle="modal" data-target="#addUserModal">用户添加</a>
              </div>
            </nav>
            <table class="table table-bordered user-table">
              <thead>
                <tr>
                  <th>用户id</th>
                  <th>用户名</th>
                  <th>密码</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody></tbody>
            </table>
            <nav>
              <ul class="pagination userpagination">
                <li class="active">
                  <a href="#">1</a>
                </li>
                <li>
                  <a href="#">2</a>
                </li>
                <li>
                  <a href="#">3</a>
                </li>
                <li>
                  <a href="#">4</a>
                </li>
                <li>
                  <a href="#">5</a>
                </li>
              </ul>
            </nav>
          </li>
          <li class="book-interface hidden">
            <nav class="navbar navbar-inverse">
              <div class="navbar-header">
                <a class="navbar-brand" href="#">图书管理</a>
                <a class="navbar-brand" href="#">图书查询</a>
                <a class="navbar-brand add-book" href="#" data-toggle="modal" data-target="#addBookModal">图书添加</a>
              </div>
            </nav>
            <table class="table table-bordered book-table">
              <thead>
                <tr>
                  <th>图书id</th>
                  <th>封面图</th>
                  <th>书名</th>
                  <th>作者</th>
                  <th>数量</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody></tbody>
            </table>
            <nav>
              <ul class="pagination bookpagination">
                <li class="active">
                  <a href="#">1</a>
                </li>
                <li>
                  <a href="#">2</a>
                </li>
                <li>
                  <a href="#">3</a>
                </li>
                <li>
                  <a href="#">4</a>
                </li>
                <li>
                  <a href="#">5</a>
                </li>
              </ul>
           </nav>
          </li>
          <li class="reader-interface hidden">
            <nav class="navbar navbar-inverse">
              <div class="navbar-header">
                <a class="navbar-brand" href="#">读者管理</a>
                <a class="navbar-brand" href="#" data-toggle="modal" data-target="#addReaderModal">读者添加</a>
              </div>
            </nav>
            <table class="table table-bordered reader-table">
              <thead>
                <tr>
                  <th>读者id</th>
                  <th>读者名字</th>
                  <th>借阅书名</th>
                  <th>信誉</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody></tbody>
            </table>
            <nav>
              <ul class="pagination readerpagination">
                <li class="active">
                  <a href="#">1</a>
                </li>
                <li>
                  <a href="#">2</a>
                </li>
                <li>
                  <a href="#">3</a>
                </li>
                <li>
                  <a href="#">4</a>
                </li>
                <li>
                  <a href="#">5</a>
                </li>
              </ul>
            </nav>
          </li>
        </ul>
      </main>
    </div>
    <!-- container -->

    <!-- addUserModal -->
    <div class="modal fade" id="addUserModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="addUserModalLabel">添加用户</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden addUser-error">用户名或密码错误</div>
            <form class="form-addUser">
              <div class="form-group">
                <label for="addUserName">用户名</label>
                <input type="text" class="form-control" name="username" id="addUserName" placeholder="请输入用户名">
              </div>
              <div class="form-group">
                <label for="addUserPassword">密码</label>
                <input type="password" class="form-control" name="password" id="addUserPassword" placeholder="请输入密码">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-addUser">添加</button>
          </div>
        </div>
      </div>
    </div>
    <!-- addUserModal -->

    <!-- loginModal -->
    <div class="modal fade" id="loginModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="loginModalLabel">用户登录</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden login-error">用户名或密码错误</div>
            <form class="form-login">
              <div class="form-group">
                <label for="loginUsername">用户名</label>
                <input type="text" class="form-control" name="username" id="loginUsername" placeholder="请输入用户名">
              </div>
              <div class="form-group">
                <label for="loginPassword">密码</label>
                <input type="password" class="form-control" name="password" id="loginPassword" placeholder="请输入密码">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-login">登录</button>
          </div>
        </div>
      </div>
    </div>
    <!-- loginModal -->

    <!-- updateUserModal -->
    <div class="modal fade" id="updateUserModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="updateUserModalLabel">修改用户</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden updateUser-error">用户名或密码错误</div>
            <form class="form-updateUser">
              <div class="form-group hidden">
                <label for="updateUserId">用户id</label>
                <input type="text" class="form-control" name="id" id="updateUserId" placeholder="请输入用户id">
              </div>
              <div class="form-group">
                <label for="updateUserName">用户名</label>
                <input type="text" class="form-control" name="username" id="updateUserName" placeholder="请输入用户名">
              </div>
              <div class="form-group">
                <label for="updateUserPassword">密码</label>
                <input type="password" class="form-control" name="password" id="updateUserPassword" placeholder="请输入密码">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-updateUser">修改</button>
          </div>
        </div>
      </div>
    </div>
    <!-- updateUserModal -->

    <!-- addBookModal -->
    <div class="modal fade" id="addBookModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="addBookModalLabel">添加图书</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden addBook-error">用户名或密码错误</div>
            <form class="form-addBook">
              <div class="form-group hidden">
                <label for="addid">id</label>
                <input type="text" class="form-control " name="id" id="hiddenid" >
              </div>
              <div class="form-group">
                <label for="addBookimg">封面图</label>
                <input type="file" class="form-control" name="logo" id="addBookimg">
              </div>
              <div class="form-group">
                <label for="addBookname">书名</label>
                <input type="text" class="form-control" name="bookname" id="addBookname" placeholder="请输入书名">
              </div>
              <div class="form-group">
                <label for="addWriter">作者</label>
                <input type="text" class="form-control" name="bookwriter" id="addWriter" placeholder="请输入作者">
              </div>
              <div class="form-group">
                <label for="addAmount">数量</label>
                <input type="text" class="form-control" name="bookaomunt" id="addAmount" placeholder="请输入数量">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-addBook">添加</button>
            <button type="button" class="btn btn-primary btn-updateBook" style="display: none;">修改</button>
          </div>
        </div>
      </div>
    </div>
    <!-- addBookModal -->

    <!-- addReaderModal -->
    <div class="modal fade" id="addReaderModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="addReaderModalLabel">添加图书</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden addReader-error">用户名或密码错误</div>
            <form class="form-addReader">
              <div class="form-group">
                <label for="addReadername">读者名</label>
                <input type="text" class="form-control" name="readername" id="addReadername" placeholder="请输入读者名">
              </div>
              <div class="form-group">
                <label for="addReaderbookname">借阅书名</label>
                <input type="text" class="form-control" name="readerbookname" id="addReaderbookname" placeholder="请输入书名">
              </div>
              <div class="form-group">
                <label for="addReaderstatus">信誉</label>
                <input type="text" class="form-control" name="readerstatus" id="addReaderstatus" placeholder="信誉评定">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-addReader">添加</button>
          </div>
        </div>
      </div>
    </div>
    <!-- addReaderModal -->

    <!-- updateReaderModal -->
    <div class="modal fade" id="updateReaderModal" tabindex="-1">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
            <h4 class="modal-title" id="updateReaderModalLabel">修改图书</h4>
          </div>
          <div class="modal-body">
            <div class="alert alert-danger hidden updateReader-error">用户名或密码错误</div>
            <form class="form-updateReader">
              <div class="form-group">
                <label for="updateReaderid hidden">读者id</label>
                <input type="text" class="form-control" name="readerid" id="updateReaderid" placeholder="请输入读者名">
              </div>
              <div class="form-group">
                <label for="updateReadername">读者名</label>
                <input type="text" class="form-control" name="readername" id="updateReadername" placeholder="请输入读者名">
              </div>
              <div class="form-group">
                <label for="updateReaderbookname">借阅书名</label>
                <input type="text" class="form-control" name="readerbookname" id="updateReaderbookname" placeholder="请输入书名">
              </div>
              <div class="form-group">
                <label for="updateReaderstatus">信誉</label>
                <input type="text" class="form-control" name="readerstatus" id="updateReaderstatus" placeholder="信誉评定">
              </div>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-updateReader">修改</button>
          </div>
        </div>
      </div>
    </div>
    <!-- addReaderModal -->

    <script src="/lib/jquery/jquery-1.12.4.min.js"></script>
    <script src="/lib/bootstrap/js/bootstrap.min.js"></script>
    <script src="/lib/ejs/ejs.min.js"></script>
    <script src="/js/index.js"></script>
  </body>

</html>